package nave.android.game;

import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.geom.Point2D;

public class Ruby extends AnimatedObject{
	
	Asset texture;
	Point2D posicaoRuby;
	Point2D dimensao;
	Point2D posicaoCorte;
	Point2D dimensaoCorte;
	boolean Visivel = true;
	
	public Ruby() 
	{		
		super(texture, posicaoRuby, dimensao, posicaoCorte, dimensaoCorte, 0.2f, new Point(1, 2), false);
	}
	
	public void Update(Rectangle Personagem)
	{
		if(Visivel)
		{
		Rectangle Ruby;
		if(Personagem.intersects(Ruby))
		{
			int Pontos = 1000;
			Pontuacao(Pontos);
			Visivel = false;
		}
		}
	}
	
	public void DesenharRuby(Graphics g)
	{
		if(Visivel)
		{
			g.drawImage(texture, posicaoRuby, dimensao, false);
		}
		
	}

}
